//
//  AENewsCommentsLikeRequest.m
//  AESOLAR_IOS
//
//  Created by Bin Tang on 2024/10/29.
//  Copyright © 2024 Mr.Wang. All rights reserved.
//

#import "AENewsCommentsLikeRequest.h"
#import "AE_Solar-Swift.h"

@interface AENewsCommentsLikeRequest ()
@property (nonatomic, assign) NSInteger commentId;

@property (nonatomic, assign) NSInteger like;
@end

@implementation AENewsCommentsLikeRequest

- (instancetype)initWithCommentId:(NSInteger)commentId like:(NSInteger)like {
    if (self = [super init]) {
        self.commentId = commentId;
        self.like = like;
    }
    return self;
}

- (NSString *)requestUrl {
    return kAPP_NEWS_COMMENTS_LIKE;
}

- (TYZRequestMethod)requestMethod {
    return TYZRequestMethodPOST;
}

- (id)requestArgument {
    NSDictionary *params = @{
        @"commentId":@(self.commentId),
        @"like": @(self.like)
    };
    NSString *json = [params yy_modelToJSONString];
    NSString *aesStr = [AESCrypt AES128Encrypt:json key:[AEUserCommonInfo getAesKey]];
    return @{@"requestData": aesStr};
}

@end
